package net.pimpas.security.serviceprovider.auth;

import java.io.Serializable;
import java.util.Set;

import net.pimpas.security.serviceprovider.auth.login.principal.Principal;

public interface Subject<T extends Principal> extends Serializable {
	
	public Set<T> getPrincipals();
	public boolean containsPrincipal(T principal);
	public void addPrincipal(T principal);
	public T removePrincipal(T principal);
	public T getPrincipal(String name);
	
	public Set<Object> getPrivateCredentials();
	public Set<?> getPrivateCredentials(Class<?> c);
	public Set<?> getPublicCredentials();
	public Set<?> getPublicCredentials(Class<?> c);
	public boolean isReadOnly();
	public void setReadOnly();
	
}